a path with a trailing slash is invalid anyways. but lets be defensive here.

i fail to understand why the count for the root node '/' returns 0, but the test seems to prove it works as expected