[#2052] Only raies OSError from deleteFile.
[#2065] Fix getSegmentsFromRealPath to raise error for path ouside of root.
Merge branch 'master' into 2055-makelink-win