Fixed use check-local to avoid problems with newer versions of automake
Fixed TESTS_ENVIRONMENT for running tests