Utility method to get global npm.dir