This is intended to fix #2810. It sets the context of the tmp_dest file after shutil.move() operation and before os.rename(). This should retain the selinux context of the file across moves.