Remove UTF-8 BOM when reading a file.
Fix resource leak.
Update readme.