synatax fixes for 1.8.6 support
escape path as regexp
Merge pull request #905 from JonRowe/186_support

1.8.6 Support