Fix up tests; add ./run_test script, for both Travis CI and local use