Add test to check that reading from a pipe works ok