chpathtool: fix mime_type TypeError, bug #473892