Fix #217: make export escape $ in replacement string
Merge pull request #249 from rmmh/master

Fix #217: make export escape $ in replacement string
Merge pull request #250 from increpare/master

merge fixes from master