accepts and closes issue #1221598: adds an optional callback to ftplib.FTP