Changed how we pipe to stdout from shell calls to be compatible on linux

Instead of piping stdout to sys.stdout, piping to subprocess.STDOUT.