JOHNZON-16 Fix BOM detection for UTF-8, new testcase for stream that throws an exception by Thiago Veronezi