If there is no explicit path in a URL default to /

If one would attempt to use a URL like http://example.com the current
module would fail to find a path, and instead take the last char of
the host as the path.

Fix the regex to allow no path to be present, and it we end up without
one default to /