exercises: Fix pipes and add a test case