Extract metainfo into its own module.
Add test for parsing metainfo files.