Remove some unnecessary regular expressions from the templates util ns.

Also:

* Add tests for string-munging fns
* Correct doc for name-to-path