Fix slash in URL handling in REST connection test.

Fix for JENKINS-22595
https://issues.jenkins-ci.org/browse/JENKINS-22595