mingw: prepare the TMPDIR environment variable for shell scripts