Remove the old cache dir before moving the bootstrapped cache dir into the real location
Remove the old cache dir before moving the bootstrapped cache dir into the real location

Seems like some combination of things (bad cache dir, shallow checkout, etc) causes
git cache to not clean up properly before trying to move new directory A into
already existing directory B.

So the logic is all there to detect that the cache is invalid, its just not
being cleaned up properly during shallow checkouts.

BUG=406864
TBR=iannucci

Review URL: https://codereview.chromium.org/499123002

git-svn-id: bd64dd6fa6f3f0ed0c0666d1018379882b742947@291587 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

svn2github/chromium-depot-tools,svn2github/chromium-depot-tools,svn2github/chromium-depot-tools