Make utility work with Xpath (remove trailing slash from "path")