fix temp file creation on osx