daemon.c: fix condition for redirecting stderr