Kpatch script improvements