Changed CollOfScalar::getDevValues to CollOfScalar::data
Changed read and write functions to use std::vector instead of manually malloc and free.
output now writes to file or stdout according to input parameter.