Fix bug in directive regex - was capturing/stripping things like '<%= top %>' when trying to strip directives