trans_export has been decided to use a *bytes* output buffer as some of the output formats are text-ish (e.g. po) but others are definitely binary content (e.g. XML). Therefore, when calling trans_export with a *file*, it needs to be open in *binary mode*. Fixes #20555