Fix undefined function problem on windows

os.path.samefile is not implemented on Windows.  Try to compare paths there.