Remove strcpy calls, proper use of strncpy/strcpy_s

Replaced all usages of `strcpy` with `strncpy` or `strcpy_s`.

Make sure that all usages of `strncpy` specified the correct buffer size.