Changed way string is created, to correct compilation problems.

This correct the problems that were had with the difference between c_str() and char_str(). This should normally correctly compile for everyone.