Fix up file type detection code.
Fix up file type detection code.

-b skips the filename in the output so we don't have to slice it off
(or fail miserably if a filename contains a colon).

Now we use MIME types (-I) as this should be more accurate, since JSON
identifies as a variety of things.

Change-Id: I6cc9249e9f44e0b5c17ea1deb7308b45033f6daa
Reviewed-by: Joerg Bornemann <47777b9406dbddd02a3fdca8341789a013805a11@digia.com>

villytiger/qbs,villytiger/qbs,Distrotech/qbs,qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,gatzka/qt-labs-qbs,gatzka/qt-labs-qbs,qt-labs/qbs,qt-labs/qbs,qtproject/qt-labs-qbs,gatzka/qt-labs-qbs,Distrotech/qbs,gatzka/qt-labs-qbs,gatzka/qt-labs-qbs,Distrotech/qbs,gatzka/qt-labs-qbs,qt-labs/qbs,qtproject/qt-labs-qbs,Distrotech/qbs,Distrotech/qbs,qt-labs/qbs,Distrotech/qbs,villytiger/qbs,qt-labs/qbs,villytiger/qbs,qtproject/qt-labs-qbs,qt-labs/qbs,Distrotech/qbs,qt-labs/qbs,villytiger/qbs,gatzka/qt-labs-qbs,qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,villytiger/qbs