Changed mktemp to specify an argument for osx.