Simpler path_split() implementation.