bug fix to get_tmp_dir