Fix adding of extra trailing slash when calling getUrlWithCreds()

Currently when the method is called with an url line http://www.example.com/path/to/file.zip this method puts an extra trailing slash at the end and you end up with the url - http://user:pass@www.example.com/path/to/file.zip/
Although the url has creeds inserted, the trailing slash makes it invalid and any requests to it cause 404 responses.