Fix unknown mimetype condition

Return value of mimetypes.guess_type(name) is a tuple. First element may be None, not the tuple.
Merge pull request #3 from mhsekhavat/master

Fix unknown mimetype condition.
Return value of mimetypes.guess_type(name) is a tuple. First element may be None, not the tuple.