Fix truncation of FreeRTOS task names.

The code fails to allow room for the terminating NUL which means the last character is cut from the task name. Using string.c_str() instead lets us access the name as a char* without needing any manual conversion.