fix tmpfile expansion