Save metadata to XML file. Fixes #GEON-36