Fix logic for detecting root directory on Windows.

On Windows, the root directory includes the drive letter and a colon.