Added unittests for creating jsonpatch with stepsiblings and fixed a couple of bugs in patch-creation.