Fixed regex pattern matching on string properties.

The pattern matching logic wasn't right - starting with the parse-regexp module. I've written the logic to AVOID using eval though that's a way simpler way to do this and probably reasonable for our use case but admittedly not best practice.  

There are a series of test cases now as well as a new error that gets thrown in the event that someone specifies a bad pattern.  This deviates from current behavior that just swallows invalid patterns and lets any string through - perhaps you'd prefer we continue doing that - although frankly I'd very much like to know if my patterns are invalid. 

Please review and let me know what you think. At a quick glance I know I need to fix spaces in string.js - but am too tired to tackle that at the moment.  Fixes #10 .