Escape path separator when using it as part of a regexp. [closes #233]