Eagerly delete private tempfiles
If we create a tempfile that will only be used by the current process it is a good habit to immediately delete the tempfile. Deleting immediately means we don't have to remember to delete the file, one less thing to remember.
This change also fixes a check for empty zip files which would panic with an out-of-bounds slice access.
Edited by Jacob Vosmaer