Allow stdout to be redirected.
Allow stdout to be redirected.

Before, redirecting stdout could cause the ui not to show. By redirecting
stdout to /dev/tty while in curses mode and restoring it before outputting
the selection stdout can now be redirected without any problem.

GBuella/pick,temochka/pick,prahlad37/pick,calleerlandsson/pick,DBOTW/pick,DBOTW/pick,prahlad37/pick,calleerlandsson/pick,GBuella/pick,calleerlandsson/pick,thoughtbot/pick,temochka/pick,prahlad37/pick,thoughtbot/pick,prahlad37/pick,thoughtbot/pick,thoughtbot/pick,DBOTW/pick