Add additional padding on unescape scenarios.  Also fix appendformat which does not use vsnprintf correctly.