Add unit tests for PrairieMetadata

These tests are by no means complete, but do provide regression tests
for the bugs fixed in the previous commit.
WIP