Escape special characters outside matching groups

Changes:

* Introduces logic for escaping regexp special characters outside of matching groups
* Correctly identify regexp matching groups and push `undefined` values into the keys array so keys can be correctly matched
* Allow escaping of path special characters (asterisk, parentheses, etc.)
* Improved testing readability using `deepEqual`, will update all tests when all PRs are merged