test: improve error reporting in test-child-process-pipe-dataflow
When the test fails, it usually ends up failing on the assertion that
wc
did not find as many bytes as it expected. That may not be
helpful if it is caused by a failure earlier in the command
pipeline ( cat | grep | wc ). Move the byte check to
process.on('exit')
so that other error handlers that report the
existence of errors run first.