Do not blindly use passed pointer to the TEST_FUNCTION (et.al)

Instead make a strncpy of it. Since passed pointer can be freed behind
our back, when we still need it.