Fix to allow "remotes/origin/" in branch spec

https://issues.jenkins-ci.org/browse/JENKINS-20767
See comment:
https://issues.jenkins-ci.org/browse/JENKINS-20767?focusedCommentId=196575&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-196575