Use istreambuf_iterator to copy file in std::string