Parameterize `fs`.

I'm going to want to test that interrupted/partial writes are handled
correctly, so I'm going to want `fs` to be overridden.