Use cross-platform compat for mktemp.