Returns the path segment at the specified index.
The segment string at the given position.
The zero-based index of the segment to retrieve.
if the index is out of range.