fix send_file() error on mime type (refs #4678)
follow 3.3's conventions by using mime_by_ext
pass the extension, not the filename
Merge pull request #393 from melvinmt/bugfix/4678

fix send_file() error on mime type (refs #4678)