Modernize Lib/posixpath.py: Use startswith(), endswith(), rstrip(), struct_passwd attributes and +=.
Modernize Lib/posixpath.py: Use startswith(), endswith(), rstrip(),
struct_passwd attributes and +=.

From SF patch #755245.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator