[es] Ensure that we open files in binary mode.