subprocess popen stdout flush