USE subprocess.Popen API correctly.

When collecting stdout/stderr *and* feeding data into a Popen instance,
communicate() must be used to avoid a known deadlocking scenario
when data sizes cross PIPE_BUF (which can be as small as 512, although should
be much larger in practice on linux).

No point in leaving the potential issue in code since the fix is bloody simple, hence this quick patch to resolve it. :)