Final bug fixes (mostly in tests themselves).

This includes setting the locale always when using the locale, and
switching to unicode literals in the tests.