Add examples for GenericPath methods.

I wanted to use `assert_eq` throughout, but that does not seem possible (see #15625)
In general I think all the usage of manual bytes below could benefit from using byte strings (for things like `filename` and such)