Fix curd for Python 2.6

logging.StreamHandler has a different constructor in Python <2.7. This
change instantiates the handler differently based on whether the user
is running Python older than 2.7.