Fix patternProperties bugs. Do pattern validation on the regex. Add new unit tests.
Merge pull request #40 from mchiocca/master

Fix patternProperties bugs and do validation on the pattern regex. Add new unit tests.