IE8 support for trex dependency detection
When receiving uploaded files, detect their mimetype using libmagic.