utility.real_str: test, and requisite bug fixes