Add examples for GenericPath methods.

I wanted to use `assert_eq` throughout, but that does not seem possible (see #15625)
Thanks, I somehow missed that byte strings were even a thing. These should all be fixed now.