Updated createNewFormat function.

Function now returns unescaped string for format strings without any format specifies (including empty). See revision here: https://gist.github.com/mykohsu/5d37b58674dc13f9e78b