def rename(self, oldpath, newpath):
oldpath = self._adjust_cwd(oldpath)<EOL>newpath = self._adjust_cwd(newpath)<EOL>self._log(DEBUG, '<STR_LIT>' % (oldpath, newpath))<EOL>self._request(CMD_RENAME, oldpath, newpath)<EOL>
Rename a file or folder from C{oldpath} to C{newpath}.

@param oldpath: existing name of the file or folder
@type oldpath: str
@param newpath: new name for the file or folder
@type newpath: str

@raise IOError: if C{newpath} is a folder, or something else goes
    wrong