pre-compile regexps; handle branches starting with '/'

bitbucket.org/hpk42/pytest contains a branch beginning with '/': /minor-doc-fix-in-skippingtxt-also-submi-1387492852421
it breaks import