Allow passing in a callback before writing output

This allows for (optionally) modifying the unit tests (e.g. modifying or
normalizing the suite or test names) before writing the output file.
Merge pull request #1 from thp/filter-function

Allow passing in a callback before writing output