fix some coverity errors on string copy

coverity complains about some strcpy stuff, make it happy.