Make tests compatible with PHP 5.3+ magic mime file format

Required magic mime file format has changed in PHP 5.3. This change includes magic file in the new format and use it in tests on PHP 5.3+.