Preserve all attributes on file edit and copy

This solves issue 2728: "CFEngine does not maintain security context when editing or copying files"