improve file_to_string, reduce realloc calls
Merge pull request #2 from vikraman/master

Improved file_to_string code