Tests

The actual test coverage is minimal, but I wanted to get the autotools stuff in, and other PRs also add tests