improved the fix for bug #66395

- fixed the traverse vulnerability in case like c:d:file.txt
- ensure paths containing NTFS streams are still worky
one more extension for the basename test