Fix incorrect result pipe return.
Add a basic sanity test for result pipe.
Tidy-up README