Fixing tempfile issues on certain machines