Fixed many off-by-1 errors in the use of strncat() identified by clang warning.