Fix encoding detection in python (shebang line was not parsed anymore)