Add tests for checking Git URLs even if hash is not a valid semver version

Note: currently for some reason `npm test` fails when run twice on both
Node 0.10.33 & 0.11.14 with npm 2.1.7. It needs to be fixed before release.