tempfile2 function

Make a temporary file in a temporary (sub-)directory