Makes code compatible with PHP 5.3.3

`SplFileInfo::getExtension()` is only available since PHP 5.3.6