Check for a git cache dir before using it

So I guess git fails if there's no local cache dir.  This is kind of a
pain, but I guess it's livable -- I just check for the cache directory
before actually using it.