Make test framework more easily reusable

These changes make it easier to use the Tern test framework to test independent plugins.