Use Popen's process.communicate and simplify collecting error data.