Fixing a few bugs including bad CString routine; ported BSON Parsing
test from MAg7