Add test for filtering of empty category names

To hopefully make it obvious what those bits of code are for
Add test for trimming category names

Warks library dashboard data is a little dirty in terms of trailing whitespace so we need to trim it to keep the output clean