Allow handling NPM version numbers with hyphens

Hi,

Please consider pulling this change.  It allows NPM packages with hyphened version numbers to work.

Note that it also includes a commit with the v0.1.12 changes, apparently missing from any repo I could find.  Feel free to cherry-pick the top commit instead if you have these changes in a local repo, though I would also appreciate having the full history available publicly.

Thanks,
-bcd