Introduce a filtered flow writer, and use it in dump.py

Fixes #104