[#2338] Store the temporary packfile in /tmp.

Now that we know how to find the location of system temporary directory
and since the indexer no longer relies on the location of the packfile
to determine where the index is supposed to reside, we can finally move
the temporary packfile where it belongs, to the temporary directory.

A side effect of this change is that it fixes the problem of writing to
descriptor and reading from mapped region which is specific to remote
filesystems on Windows.