Extend functionality of test-category script.

This adds multi-category support and an already-installed check to
test-category.