Hi David,
I just got round to running your script, but I get the error
sox FAIL formats: can't open output file `/tmp/sox/filename.mp3': No such file or directory
mv: cannot stat '/tmp/sox/filename.mp3': No such file or directory

Any ideas why this is happening?