moved away from path.join for building uri and regular expressions.

This commit fixes the issues in helpers.js where path.join in windows incorrectly builds uri and regular expressions.