Removed line buffering from `stdout` and `stderr`

This is so that prompts don't get swallowed
Simplified implementation
Simplified code further
Updated description
Improved detection of end-of-process