When using subdirs to reflect categories, the underlying `categories` attribute was not set
Do not forget to downcase the categories here as well
Merge pull request #2633 from redox/read_categories_from_path