Automatically generate categories

This generates categories from a json file stored in db/categories/categories.json.
Images should be stored in assets/category_images/id.jpg where id is the id of the category.