fixed the fileinfo usage for PHP >= 5.3