Simplify noDirs
Use System.FilePath.Posix for file extension handling
Improve readability
Rm unused splitBy function