Updated for compatibility with npm scoped packages

Sorry for all the false positives on changed lines! My editor automatically strips trailing white space.

All that was required for this is to URI encode the repo variable in lookup. This is mainly because the '/' in @scope/package looks like a path separator whereas it's part of the package name. The fact that @ will also get encoded shouldn't affect functionality at either end.