title: Change path separator using path module
body: <p>Here is my code:</p>
  
  <pre><code>var thisImageName = thisRow["imagename"];
  var thisImagePath = path.relative("./public", __dirname + "/public/uploads/" + thisImageName + ".jpg");
  console.log(thisImagePath); // returns __dirname\public\uploads\
  img.src = thisImagePath.split(path.sep).join("/");
  </code></pre>
  
  <p>To get the appropriate image path, I have to split by the path separator and then join the array with the appropriate slash. Does anyone know of a more efficient way of doing this?</p>