Move shebang line to top

The shebang line should come first, followed by encoding declaration (pep-0263).