Add strlcpy, strlcat implementations lifted from OpenBSD project and use it to replace a potentially unsafe strcpy/strcat use.