fix for latest nbb
fix for latest nbb

templates:compiled was firing before the plugin.init was called so modifyCategoryTpl was never called
also added error checks.
NodeBB/nodebb-plugin-category-sections,eugenioclrc/nodebb-plugin-category-sections