replace dirname/basename calls with phpcr-utils PathHelper