Remove use of stpcpy

Use strlcpy instead, which is safer.