Ignored STATIC_ROOT and MEDIA_ROOT in makemessages

Also alleviate issues with weird file names typically found in
MEDIA_ROOT directories (#23010).