Fix tests for py3 compatibility

Needed explicit encoding of text as UTF8, and a change to dict keys() method
meant that the "changed size during iteration" issue surfaced unexpectedly in
the access() test generator for concrete files.