More rigorous handling of raw_vals in SMOKE test

Should resist null characters and random line breaks.