Fix encoding check with shebang.