Use mrb_format() instead of s*printf().

There have a bug fix and two improvements.