Fixed mktemp bug on mac