changed mv to cat ... > .... to preserve original rights

To preserve selinux contexts and ACLs mv was replaced by cat + output redirection.