Check extension rather than mimetype

@chrisndodge I still can't really reproduce your issue, but I tried playing with the if-expr, and it seems pretty certain it was caused by the file.type not matching "application/x-gzip". Switched to matching the filename extension - let me know if this works for you.