Support refspecs with the asterisk in the middle

We currently do not support refspecs such as

    refs/pull/*/head:refs/remotes/origin/pr/*

and instead completely mangle them up. This is not good, so fix it.

---

This is probably also something that should go into a maintenance release, since we currently will accept such refspecs, but then completely fail to do something sensible.