Use communicate so process out does not deadlock
Merge pull request #5 from praekelt/feature/issue-4

Use communicate so process out does not deadlock