The /e modifier of preg_replace() deprecated as of PHP 5.5.0

As of PHP 5.5.0, the `/e` modifier [marked as deprecated](http://php.net/manual/en/function.preg-replace.php) and `bin/templatemap_generator.php` uses that. I just replaced one `preg_replace()` method with  `preg_replace_callback()` using a clousure while keeping current functionality.