Update loadfile.php

fixed detection of file encoding and worked around problem with function `mb_detect_encoding` described in `http://php.net/manual/de/function.mb-detect-encoding.php`