sprintf.js forked to match Lua's string.format() behaviors for lua.js