For stat names containing periods, replace with '#' rather than throw exception

In relation to http://opensimulator.org/mantis/view.php?id=7317
Make proper fix for last commit wrt Mantis 7317 by replacing disallowed c char and not literal 'c'