fix up unit test script, add copyright headers