When the Directory config is set to something other than the default the bulk export crashes when exporting the emoji with the following error:
This is causing missing messages when running the export.
It is happening on 5.23.1 and 5.25.1
See description
Related to https://mattermost.atlassian.net/browse/MM-27178
Tested and passed