Check ftell() result for error code before using it.
Merge pull request #193 from Dmitry-Me/shouldCheckFtellForError

Check ftell() result for error code before using it.