Small fixes to make perl critic happier.
Fix bug that randomly truncated output with long scripts (~4K)

In other words: don't use a TTY for non interactive sessions.