Harmonize uses of fgets()
Merge pull request #620 from lpefferkorn/fix_fgets

Harmonize uses of fgets()