Could have used shutil.copy rather than shutil.copyfile, but this implementation preserves the md5 comparison to avoid unnecessary copies