Prevent catastrophic failure from regexp parse errors

Wrap exclusion regexp creation in a try catch to prevent parse errors from disabling functionality.

Fixes #1306.