Improve windows path detection