make tempfile name generator more portable