moved TemporaryWorkingDir into utils.tempdir
test for TemporaryWorkingDirectory
simplified copy_files logic
minor typos
cleanup unused bits