Fix #20422: Fix makemessage's --ignore patterns being applied to

the full path instead of the file name.
Thanks to nnseva for the report and the original patch.