Fix posixpath.realpath() for multiple pardirs (fixes issue #6975).