Add script to apply patches into tools/