Fix backup and return conditions for pattern_match.

Previously could screw up if p_end was 1 over the end or o_str was over
the end (neither of which should happen, since the only time you could
end up with 1 over the end on p_cstr is if * was at the end of the
pattern but didn't terminate early, and o_cstr simply can't go over
the end of its string through any normal means, but better safe than
sorry).