Allow multiple files to be written and cached per source module.

Closes #49.
Add a test of multiple file output.