Fix the security checklist with super-locked-down webservers.

Some web server configurations prevent uploading of files with suspicious types
(like .cgi, .php, etc). In this case, the security checklist would throw a 500
because it would fail to even save the file, much less fetch it.

I've rearranged things a little bit to catch OSError exceptions when saving
files and remove them from the list of things that we then test/delete.

Testing done:
Manually caused one of the file types to throw an OSError and saw that the
security checks still passed.

Fixes bug 3341.

Reviewed at https://reviews.reviewboard.org/r/5827/