Made sure we properly clean up temp files and directories
Minor changes to naming of temp files