Make whole script comaptible with python 2.6

How low we fell :(

Also:
 * On Python 2.6 we have to send bytes to proc.communicate() not
   unicode str (Fixes #288)
Eliminate do_redirect() method.

One less HTTP connection, which was actually not needed.