Fix file globbing with multiple dots (#784)

Setting the "data-files" field in a .cabal file to pull in
"resources/*.js" would previously not work for any file containing more
than one dot, for example "resources/jquery-1.9.1.js".

This commit changes this behaviour so that a glob counts as a match,
provided that its extension is a suffix of the filename. So, if
resources/ contains foo.js and foo.bar.js:

* "resources/*.js" will match both "resources/foo.js" and
  "resources/foo.bar.js"
* "resources/*.bar.js" will match "resources/foo.bar.js" but not
  "resources/foo.js"

It should be noted that I've only tested this by calling
matchFileDirGlob in ghci -- I'm fairly new to Cabal, and can't see how
to test it properly.