Handle unicode better

Check that browse comparisons are str to str, not mixing str and unicode.

Update all logs to use %s, as it doesn't have problems mixing str and unicode strings.