See
http://hackage.haskell.org/trac/ghc/ticket/2034
to which I have attached a fairly simple patch. All the tests pass.
The main change is that
splitFileName "foo" = (".", "foo")
and
takeDirectory "foo" = "."
and
"." </> x = x
Discussion period: 2 weeks (5 October)
Cheers,
Simon