make tmpfile slightly more efficient (use unlink syscall instead of remove)