[MimeDetection] refactoring mime detection

As suggested by https://github.com/globocom/thumbor/issues/139#issuecomment-11288354

use of startswith() instead of [:n]