path2: Implement stat support
path2: Rename pop_opt() to pop() and add each_parent()