minor tweaks to BinaryInputOutputStream shared_ptr use