Rename category to attribute.
Fix bug in test macros.
Fix a bug in test_parse, and the bugs in parse's file input strategy that it was masking.