More exhaustive tests for run with timeout
Fix unable_to_parse bug as reported by SJoseph.

This bug has another aspect that becomes apparent when we read
the output of the spawned process so slow, that the process
terminates long before we read its whole output. This alone is
not bad, however the condition thread.alive? was used in the while
loop. This led to the premature termination of run_with_timeout.