Check if the refspec matches before transforming

So I've managed to produce a crash by calling ```git_refspec_transform``` by not checking ```git_refspec_src_matches``` before-hand (using ```refs/heads/*:refs/remotes/origin/*``` as the refspec, and passing just "master" to the transform).

We should first ensure that the transformation can be applied (```git_refspsec_src_matches```) before attempting the transformation. Sure the user should really perform the check first, however, crashing if the user didn't is not acceptable. We should be setting ```GITERR_INVALID``` for these scenarios.
Yeah, you're right, I'll quickly fix that.