Haskell image file sorting