Remove superfluous .str() and replace std::string concatenation with Twine.