Refactor splitDirectories

Use `dropTrailingPathSeparator` instead of the custom function `g` to remove
trailing path separators from FilePath components generated with `splitPath`.

Since `dropTrailingPathSeparator` does not change FilePath components
for which isDrive is True, it is no longer necessary to handle the first
FilePath component in a special way.
Merge pull request #19 from thomie/splitDirectories

Refactor splitDirectories