SLING-6782 : Sling Job implementation should avoid unnecessary writes to the repository. Apply patch from Jörg Hoh. Modified the patch to be able to remove duplicate code from ResourceUtil