Ink fixes

Fixing error of relative dirs, escaping of template characters and broader regex for optional params