This is nitpicking, but we should use `\z` instead of `$`. The former matches the end of a string, the latter matches the end of a line. (See http://stackoverflow.com/questions/577653/difference-between-a-z-and-in-ruby-on-rails-regular-expressions)

This isn't a _huge_ issue for us, since we're just matching the extension and not doing any validation or sticking the filename into the DB.

(Ruby has `File.extname` but it takes the extension starting from the last dot, so unfortunately we can't use it.)