supported copying over file mode bits

using shutil.copymode() to copy the permission bits.