The script itself looks pretty good to me, but you might want to take a look at
Shelly [0] for Haskell scripting in the future. It's a really nice library / DSL for "bash"-like scripting directly in Haskell. If you try out Shelly, I suggest trying it with ClassyPrelude and -XOverloadedStrings, which makes dealing with all the Text and FilePath types bearable. (Heh, though it's annoying, having FilePath as a separate type once prevented me from writing code that deleted my home directory upon being run... fun story.)