Fixed OS support for Windows directory searches