changing mktemp to work with OSX