kpatch: a few minor script cleanups