Clean up
Change and parameterise category
Fix broken JSON containing double periods
Avoid writing header unless records to follow

Only print a header line if we're actually writing some QIF records