fix dependency on php 5.3.6. using pathinfo instead of SplFileInfo::getExtension