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

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