check_parse: Fix error handling of fgets

The man page isn't entirely clear as to whether errno or ferror() get
set on errors. All we can check for is a return of NULL and not feof().

In that case, print errno, though on some implementations it may be
bogus.