Rework the handle -> path code, still needs some more work as it doesn't work on pipe handles