Backported os daemon tests from trunk. This reduces the chance that these tests fail due to timing differences by avoding booting of an Erlang VM as an os daemon.