Have path.js support _rewrite paths

This patch will let you use path.js to build paths to _rewrite locations on your ddoc with ease.