script_helper: kill the subprocess on error

If Popen.communicate() raises an exception, kill the child process to not leave
a running child process in background and maybe create a zombi process.

This change fixes a ResourceWarning in Python 3.6 when unit tests are
interrupted by CTRL+c.
1 file changed