Put all the global npm-install detection in one place. Fixes #194
Merge pull request #195 from Medium/nick-install

Put all the global npm-install detection in one place. Fixes #194