Add Chapter 6.4 exercise, and also use capture_io for tests