Improved solution to issue #179 (invalid options throwing errors in joinRegExp)

This slightly more robust solution ignores options that are not strings
or regular expressions in the passed patterns array.

The prior solution still accepted non-string, non-regexp options (e.g.
[], {}, true, etc.).

Credit goes to @soundslocke for the fix.