[doc] Enable documentation generated for makecat.py script
[doc] Enable documentation generated for makecat.py script

- put all global settings into main and use global variables for access
- rename global variable "main" to "main_ns"
- use pywikibot.handle_args(args) before handling local options

Bug: T203675
Change-Id: I23f3bfb8cd0c8c7fbb027e38ab99d6f037ff7c14

PersianWikipedia/pywikibot-core,wikimedia/pywikibot-core,wikimedia/pywikibot-core