Returns: *this if has_relative_path() is false,
otherwise a path whose generic format pathname is
the longest prefix of the generic format pathname of *this
that produces one fewer element in its iteration.
[Example 3: path("/foo/bar.txt").extension(); // yields ".txt" and stem() is "bar"
path("/foo/bar").extension(); // yields "" and stem() is "bar"
path("/foo/.profile").extension(); // yields "" and stem() is ".profile"
path(".bar").extension(); // yields "" and stem() is ".bar"
path("..bar").extension(); // yields ".bar" and stem() is "." — end example]
On non-POSIX operating systems, for a path p,
it is possible that p.stem()+ p.extension()== p.filename() is false,
even though the generic format pathnames are the same.