fix for mac osx

mktemp in osx (and freebsd) does not work without a template