Add tests for metadata encoder and parser as well as UTF-8 tests for BDF reader and writer
This also includes a commit to fix issues found in the metadata encoder and parser.
This also includes a commit to fix issues found in the metadata encoder and parser.