avoid crash when stdout is not open in call to hIsTerminalDevice
avoid crash when stdout is not open in call to hIsTerminalDevice

Saw this happen in
http://propellor.branchable.com/forum/Fail_to_push_changes_when_merging/
although I don't entirely understand the circumstances.

ArchiveTeam/glowing-computing-machine