Use a different function for checking paths in Windows that works with CTest.