Honor setting `cache` path via environment variable.

Before this change, typing `npm config get cache` would result in `$HOME/.npm` even with `NPM_CONFIG_CACHE` set to some explicit path.