Do not use os.isatty as it messes up when used with.
Merge branch 'master' of https://github.com/pegasus-isi/pegasus-gtfar