Fix unit tests by converting them all to JUnit 4
Fix unit tests writing into source dirs