tablehelper.lua: Efficiency improvements to table.concat