@in_temp_dir: restore current directory before tempdir is removed