Fixed checkout of a hg url that ends with a trailing slash

If the url in the _service file ends with a trailing slash the following
exception is raised http://paste.opensuse.org/view/raw/27349609.
See also the new testcase.