MimeMagic: Use Config instead of globals

Change-Id: I07d1420deddeb886c714d7e2c99f8b456573a07f