Use formatted reference name as target for rebasing

Argument `pretty` is supposed to respect `magit-remote-ref-format`. In it's current state this throws an argument out of range error from substring.