Improve error message when a user provides a bad pattern.

Closes #119
Delete some trailing whitespace