Update collect_categories.py

bug fixed and remove extra dependece
Merge pull request #1 from karpnv/patch-1

Update collect_categories.py