Propery encode char arrays

Some calls to pack_list give integer arrays to pack as characters (such
as ChangeProperty, which takes an array of atom values).  This properly
encodes the input data so it can be packed and adds tests, some of which
would otherwise fail.

Closes #10