Simplify RatToStr code, making it closer to TimToady's original.