code: def cwd (self):
          
          path = self.urlparts[2].encode(self.filename_encoding, 'replace')
          dirname = path.strip('/')
          dirs = dirname.split('/')
          filename = dirs.pop()
          self.url_connection.cwd('/')
          for d in dirs:
              self.url_connection.cwd(d)
          return filename
docs: Change to URL parent directory. Return filename of last path
          component.