Fixes major bug (returned pointer to stack)

Make a copy of the string on the heap and return that.