Refactored the Reader into a FileReader and a StringReader to make the library usable when 'allow_url_fopen=0'