Every writer re-encoded the in-memory struct, so a command such as target --mode copy dropped every comment. marshalConfig now takes the file being replaced and copies its comments onto the keys that are still present; list items are matched by name, and a read error fails the save. registry.yaml goes the same way.
Fixes#525