Use process number as TMP dir name
Fix implemention of deleting TMP dir to correct exit status