Fix verbose code with a one liner
Should use << for string concatenation in Ruby
Merge pull request #1702 from ndbroadbent/fix_code

Tidy up some code in category_generator.rb