Use strncpy instead of strcpy

Some systems will warn when using strcpy, such as when building on
OpenBSD. Switch to strncpy instead which requires the length of the
string to be known.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>