Fix exit signal race condition in logger tests

Test process must wait for exit signal before untrapping exits, otherwise exit signal may cause it to exit.

An example of this race condition: https://travis-ci.org/elixir-lang/elixir/jobs/33988884#L292