[2.7] bpo-31920: Fixed handling directories as arguments in the ``pygettext`` script. (GH-6259) (GH-6436)

Based on patch by Oleg Krasnikov.
(cherry picked from commit c93938b5beea4c3f592119ebee6d4029558db8de)
3 files changed