Fix context in fs.writeFile callback.

Fixes error:

npm http 200 https://registry.npmjs.org/-/all/since?stale=update_after&startkey=1366973405680
npm WARN Building the local index for the first time, please be patient
npm http GET https://registry.npmjs.org/-/all

/var/www/node_modules/npm/node_modules/npm-registry-client/lib/get.js:73
    this.log.warn("", "Building the local index for the first time, please be
             ^
TypeError: Cannot call method 'warn' of undefined
    at requestAll_ (/var/www/node_modules/npm/node_modules/npm-registry-client/lib/get.js:73:14)
    at /var/www/node_modules/npm/node_modules/npm-registry-client/lib/get.js:54:30
    at Object.oncomplete (fs.js:107:15)
v0.2.21
bump request dep
v0.2.22
Merge remote-tracking branch 'upstream/master'
Fixes partial read of cache file causing cache purge and complete re-download.

If the cache file is being updated whilst also being read, the client will fail to parse the cache JSON. This causes the cache to be purged and re-downloaded in full.

This fix uses the retry module to retry a cache read should it fail to parse the contents. It is predicated on the assumption that a parse error is likely to be caused by a partial read of the cache file whilst it is being updated and that at some point in the future the cache will be ok to read and parse.