Utility method Parses given path string into an array of arrays of path segments
Returns: array array of segments