generate_user_files.py: Apply minor code clean-up
generate_user_files.py: Apply minor code clean-up

The global decleration in main function is not needed because base_dir is
not used in that function.

Typo: Change (has_userfile or has_userfile) to (has_userfile or has_passfile).

Change-Id: Ia70323fd2b8c336abb8c6b6f28c00d1ab7c6986e

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