Fix repositories with dots in the name

Before repositories like component/downloader.js were returning null. This fixes that.

I think there are more allowed characters other than `\w`, `\.` and `-`. Something to look into...