Fix daemons erroring on already closed `STDOUT` and `STDERR`

Summary: Fixes T4177. This is the only "good" way of not erroring on these lines, because detecting truthyness doesn't always tell you everything.

Test Plan: after changing the lines, `tail`ed the log. Didn't see new errors coming in. Changed the lines back and saw the log growing quite quickly.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Maniphest Tasks: T4177

Differential Revision: https://secure.phabricator.com/D7674