Add wrappers to handle fread, fgets and chdir errors/warnings (utils/io.cc)