IMO there should be `canonical` function in path module to handle this. I checked this also - https://github.com/joyent/node/issues/7635, but without any discussion. So as I said before I will prepare alternative path library with this `canonical` modificator.