Fixes bug where temp files were ending up in the user's home dir.