Introduce an encoding helper and exercise it with some non-ascii paths in the rand module tests.

Does it make sense?  I dunno.
3 files changed