Integrate the test suite with Make

Tests can now be run with `make check`.