ENH: allow msgpack to accept and return string-like objects in addition to files