adds a script `check-patches.sh` to check for patch failures and also adds a make target `checkpatches` which will invoke the check-patches script.