Fix a bug affecting URLs with multiple dots

This also simplifies the regex for handling 'git@github:' URLs.