erb check lines starting with %

the sed is a workaround for fixing lines beginning with %
as -P argument is not given to erb - still checks the line

Example: sudoers file generated by an erb template,
which has entry based on the group membership