Capture any fgets results/errors

return 0 for EOF, -1 for error as far as I can tell from the translation of the description.
Capture any fgets results/errors
Capture any fgets results/errors
Capture any fscanf errors
Capture any system errors for print call
Capture any fread errors
Capture all fscanf/fgets/fread errors/results
Capture any system call errors

Revised from previous commit which only captured the result.
Merge pull request #403 from tpaviot/review/WunusedresultFixes

Capture I/O and system call results (-Wunusedresult fixes)