cleanups
shutil.copyfileobj needs open files in binary mode