Ensure the package cache directory exists

Currently npmd-git-resolve has a problem if the `~/.npm/package` folder does not exists prior to creating the cache directory for the specific project hash.  Additionally I've cherry picked the commit from #1 to ensure the tests pass when you have an empty `~/.npm` directory.  So this closes #1 also.