Simplify and clean-up PathItem._splitPath() code.