implemented a working Devel.mkpatch and unittests for it