Gittrac #3532:  Checking close() and fclose() return values.