test writing and reading a buffer to dynamo. fix encoding issues