Fix for clang static analyzer issue CWE-119

Switch to `strlcpy` since it is safer to use and remove `strcpy` since it is insecure (although I don't know why unit test code would try to manipulate the buffer, but better safe than sorry).
This is actually incorrect; you are passing sizeof(buffer) but it does not have that much space to write into.  You can misuse the new APIs just as much as the old ones, really ;-)  It won't matter in this case but sizeof(buffer) - 100 is more correct.