Cleanup and bug fixes for deletion of temp files