[1.7.x] Revert "Applied unicode_literals to makemessages command"

This reverts commit cdfefbec7 as it caused a regression (#23271).
[1.7.x] Fixed #22686 -- Prevented makemessages crash with unicode filename

A more extensive fix has been reverted on the 1.7.x branch, so this
minimal fix replaces it.