tests: work around Python bug with EINTR in Popen.communicate()

For details see: https://bugzilla.redhat.com/show_bug.cgi?id=1073165

Change-Id: I5611069054e97fa1a6abbc6327a0166732ff9748