Hack to reduce chance of race condition after async end to pipeline.

The specific test failed a couple times with node v0.11 even though
I had never seen it fail with v0.10. But v0.11 is correct, since
I knew I was taking my chances with the async end to the pipeline.
This hack isn't guaranteed to give a deterministic result but it
should reduce the probability of failure to something acceptably
infitesimal.