Correct XMP output.
Add a unit test for XMP output.
Make the kind of output wanted for the test an enum.
Merge pull request #477 from tledoux/goodxmp

Correct XMP output and add unit test for XMP.