Escape delimiter characters in BaseExcludeFilter.

When parsing .gitignore files, it's possible that the rule will contain a '#' character (eg. https://github.com/yiisoft/yii/blob/master/.gitignore#L37). As it's the same as the delimiter character, this will cause the built regexp to be invalid. To fix this issue, the '#' characters should be properly escaped.

I've found this issue when trying to setup Satis with the Yii package, which resulted in:

    [ErrorException]                    
        preg_match(): Unknown modifier '['