Fixes for python 3.4.0

This is a little changes for starts web.py server with python 3.4.0. Fixed two errors and one problem with threads.