title: Safe cross-platform function to get normalized path
body: <p>I'd like to have a standard function that will convert relative paths into absolute ones, and if possible I'd like to make it as cross-platform as possible (so I'd like to avoid calling external library functions). This is intended so it's possible to prevent path exploitations.</p>
  
  <p>I am aware that such a function wouldn't be able to detect symbolic links, but I'm ok with that for my application.</p>
  
  <p>I could roll my own code, but there might be some problems with e.g. how a platform handles encoding or variations of the "../" pattern. </p>
  
  <p>Is there something like that already implemented? </p>