Fix some typos (found by `codespell` and `typos`)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Test edge cases + empty files, e.g. empty text content and a Unicode BOM character. See also gh-79.
Closes gh-106.