Fix incorrect assumption for linebreak tests (ref gh-2).
Add tests for warnings of encoding options (ref gh-2).
Add tests for linebreak through (ref gh-2).
Add encoding/bom handling (close gh-2).