Add filemagic gem for determining file types
Blacklist on front-end, whitelist on server side

Don't allow a few known bad extensions to be uploaded at all, then
check the file using libmagic on the server side before processing
it.