Replace a couple of safe_strncpy/cat with snprintf.