add support for computing and verifying source/patch file checksums

(includes some style fixes too)