Don't do the _tempfilestodel check if it is None

Closes #2036
Merge pull request #2043 from eteq/fix-2036

Fix for #2036