I came across this script online...
http://lightsandshapes.com/tutorials/mac/macscript
It seems to work fairly well, but every user that runs it through casper
gets a script failed even if it runs properly.
Maybe someone who has some uber script-fu can tweak it a bit (there's also
some errors on 'results.txt' that don't seem to cause problems with the
process but get logged as errors...)