rewrite fio_err using errno standard

Issue: The reference function has different name from my MINGW.
       (__errno v.s. _errno)
enhance error messages of putenv by errno.h

This fixes previous issue of unknown source of ENOMEM.