delay deamonizing until after socket is bound

If any errors occur they will be written to stderr, which is closed
as part of the deamonize call. This causes errors like 'address
already in use' to get lost.