Cast refs to string when assembling a string

RefValue preserves the type of the referenced value only if it's not
embedded in a string. If the referenced value is embedded in a string,
it must be cast to a string before appending.

Signed-off-by: martin f. krafft <madduck@madduck.net>