Call mktemp with template
Merge branch 'fix-osx-mktemp-sucks'