Move shebang line to top

The [shebang line](https://en.wikipedia.org/wiki/Shebang_%28Unix%29) should come first, followed by encoding declaration ([pep-0263](http://www.python.org/dev/peps/pep-0263/)).