converted test to Junit4
[CERES-58] Temp directory is only usable by the first user
and some cleanup