Added SubAssert class which replaces bare asserts.

This resolves issue #48