Test that ARCH packages work.

A fair amount of refactoring to reomve duplication here too.
test a couple of error cases
Correctly clean up
Fix a bug, add test to exercise, use pytest.raises.
Add some more failure case tests.