Appends a new index to a path.
As a result, the depth of the path is increased.
a TreePath-struct
the index