Introduced CopyString() which ensures trailing \0.