Changes from llonchj; Added tests to cover dots in pks in urls.

In the interests of being much more flexible in URLs, now accept more than just word characters, hyphens and forward slashes.

Tests added to cover change proposed by @llonchj in #273.