improved build and test script, and included local test runner