Correct use of std::to_string re #7617

and some other string usage improvements

Signed-off-by: Karl Palmen <karl.palmen@stfc.ac.uk>