Fixing issue 245. SplFileInfo::getExtension is not supported on old PHP versions.