Realized there was already a strdup that does almost exactly what copyString() was doing.