Stop creating imported attachments with names like blah.pdf.pdf

The bug was that File.extname('blah.pdf') returns '.pdf' and we compare that against a whitelist of the form ['pdf', 'csv', ...].  We have to strip the trailing '.' before comparing against the contents of the whitelist.
Add a .sort to the files selected by the DataMigrator

Without this we occasionally get test failures.  I think that the order of files from Dir[] is probably undetermined, but it just so happens it often uses alphabetical order by convenient luck.
Merge pull request #584 from alphagov/fix_pdf_dot_pdf

Stop creating imported attachments with names like blah.pdf.pdf

https://www.pivotaltracker.com/story/show/48166823