Exception thrown when searching a log containing non-ASCII characters

Also fails when searching for a non-ascii character.
Opening the file using codecs.open(filename, 'r', 'utf8') would be probably cleaner and avoid future errors.
Also, #10's fix in log.html would not be needed.