don't use environmental variables to detect the temp dir, but os#tmpdir()