Brad and I discussed this change set. The change violates the documented behavior of the RemoteRepositoryManager (it accepts the URL of the web application context) and the RemoteRepository (it accepts a SPARQL end point URL).
The correct change is to the BigdataSailFactory. As Brad points out, this code can not succeed as written since it always results in an extra "/sparql" in the effective URL. Further, it is not tested from within the BG code base.
Brad will close out this pull request, write tests for CI against the BigdataSailFactory, and fix the user-friendly rewrites of the URL for BigdataSailFactory.connect().