Fix gitdir not being set when cloning. Needed for writing the p4 users cache.