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