Refactored the Reader into a FileReader and a StringReader to make the l...

...ibrary usable when 'allow_url_fopen=0'