Use communicate instead of read twice. Fixes #9.