FIX: Only set winsize if running in a tty