Support out of tree builds

Ensure the tests directory is present only when check is available.  Fix
an include error when running "make check" from an out of tree build.
Merge pull request #229 from mneilsen/master

Support out of tree builds