g10: Use es_fopen instead of open.