Fixed directory scan for windows