Fix readahead memory leak

This verifies and fixes #16
The issue is that I want the second thing to block in most circumstances (i.e. I want to wait for output from the tasks) but not when the first sequence has terminated (i.e. when there are no more tasks).