Add examples for GenericPath methods.

I wanted to use `assert_eq` throughout, but that does not seem possible (see #15625)
Perhaps you could document at the module level that all the examples are written assuming unix?

@alexcrichton Do we have a tag for code blocks to skip them under Windows? You said we don't run doc tests on Windows right now but presumably that will change at some point.