Make manipulate_flags write out XML files

Make manipulate_flags write out XML files, rather than printing.

Started to update the README.