Working directory was broken in Windows.
The quoted path 'c:\d\e' was getting passed to os.path.dirname, and the result was 'c:\d\e (trailing ' missed)
NOTE: untested on Linux