Cast const string into no-const.

This fixes "deprecated conversion from string constant to ‘char*’ [-Werror=write-strings]" warning

This closes bug #1499
Merge pull request #1500 into next

Closes #1500

Closes #1499

Closes #1484