Re-work the test suite so it now works with Automake (via "make check").