It has to do with the way arithmetic and string math works, you did this:

$listen = rnd(20) + ".wav"

which tells Kixtart to add a Number to a String, the number is specified first therefore kixtart will try to convert the result to a Number, if you do this:

$listen = "" + rnd(20) + ".wav"

this does the same thing, except the "" is first and tells Kixtart to convert the result to a String, which is what you really want. Could also say:

$listen = CStr(rnd(20)) + ".wav"

-Shawn