Fix tests on Python 2.6.4

There is a bug in Python 2.6 below 2.6.5
(http://bugs.python.org/issue2646) where dictionaries passed as keyword
args to a function via the ``**kwargs`` syntax blow up if any of the
keywords are unicode strings.  Enabling unicode_literals on most modules
made a lot of tests start failing, though it probably wasn't caught
since most users with 2.6 are using a more recent version (due security
fixes if nothing else).

This mostly handles the kwargs issue, but also fixes a couple other
minor 2.6 bugs in the tests.

The kwargs issue can be handled in two ways:  One is very straightforward, which is to replace instances of 

```
kwargs['foo'] = bar
```

with

```
kwargs.update(foo=bar)
```

However, there are some cases where that does not work.  In these cases I had to employ a kind of ugly workaround of using a `normalize_kwargs` function to convert the dictionary keys to non-unicode strings.  This is only used on Python < 2.6.5, however, and can go away once we drop 2.6 entirely.

I think these issues *should* be fixed, but I'm also happy to accept "just upgrade your bloody Python" as an answer.