This version of code crawls wikipedia categories as they exist.
It preserves hierarchy for first two levels and flattens everything which is beyond level 2.