Improve robustness of function LoadDataFromFile (#1207)
Improve robustness of function LoadDataFromFile (#1207)

ftell returns a long value which can be negative when an error occurred.
It returns LONG_MAX for directories.

Both cases were not handled by the old code.

Signed-off-by: Stefan Weil <8d4c780fcfdc41841e5070f4c43da8958ba6aec0@weilnetz.de>
jbarlow83/tesseract,UB-Mannheim/tesseract,stweil/tesseract,jbarlow83/tesseract,UB-Mannheim/tesseract,amitdo/tesseract,amitdo/tesseract,stweil/tesseract,UB-Mannheim/tesseract,jbarlow83/tesseract,UB-Mannheim/tesseract,stweil/tesseract,amitdo/tesseract,amitdo/tesseract,tesseract-ocr/tesseract,tesseract-ocr/tesseract,tesseract-ocr/tesseract,tesseract-ocr/tesseract,UB-Mannheim/tesseract,stweil/tesseract,jbarlow83/tesseract,amitdo/tesseract,jbarlow83/tesseract,stweil/tesseract,tesseract-ocr/tesseract