Add support for new regular expressions. Fix permissions.