minor memory optimization to path.
exposed a Path object, which is an optimized representation of
a path string.