Updated Erlang driver's unit tests

* Made unit tests more in line with Eunit's best pratices
* Now cleanup is more robust to unexpected results