Fix for piping table output to stdout.
Fix for piping table output to stdout.

The linebuffering change made a few commits ago breaks tables being
piped with default output args.  I was mostly testing with code that was
reseting the file attr to sys.stdout so the bug wasn't obvious to me.

Doing early init of sys.stdout before the line buffering effect has been
added means we are trying to write to a bad file object later.

mayfield/shellish