Common.File: fixed exception in implementation of splitDirectories

I grepped for all occurences of splitDirectories and proved the
sorrounding code can deal with empty result lists.
Catched this if it was not the case (unsafe head/tail!).
Also built the compiler and checked it for regressions on
demo/dom/starfield. Found none.