Tweak the patch function to patched files are executable.

BSD systems patch configure, but the patch function did not set the
execute permissions on the new (patched) file. That's fixed, so now
their configure stage should work.