add npm-cache-dir@0.0.2
Factor out getCacheStat

This is one of the first steps to factor out the git part of
`cache.js` into a separate module which can be tested separately.