Reopen stdin/out/err so that daemon mode works correctly

e.g.
ssh db_host pgcluu --daemonize