Split FilePath into DirPath and FilePath

I guess it's pointless calling this `listFiles` when the type is pretty clear now?