(#21785) Module tool should include path part of URI

The module tool ignored the path part of the URI when specifying a
custom module_repository setting.

Example:
puppet module install foo-bar --module_repository=‘http://forge.example.com/forge’

fetched http://forge.example.com/api/v1/releases.json?module=foo/bar
instead of
http://forge.example.com/forge/api/v1/releases.json?module=foo/bar

Same issue when it tries to fetch the file itself.