Explicitly set key and value encoding

This closes #14 and includes its test in the test suite.