git: fix applypatch on systems where TMPDIR is not available in environment