Moves tests from .travis.yml to bash scripts in tests directory. Adds the test scripts to tests/Makefile.am so that they are included when running make check.