Changed some functions that don't modify their arg to take const arg.

It avoids caller having to strdup to create (char*) from (const char*).