added patch_path() function to output jsonpatch style paths