Add script to apply hg patches