Change file attributes to -x
Encode and Decode object keys in data for Mongo

Fixes #721