Prevent app from crashing when passed an incorrect Regexp

Closes #157