Use pathinfo() instead of SplFileInfo::getEXtension() for php lower than 5.3.6
Use pathinfo() only
Merge pull request #5528. Fix #5527
Merge pull request #5528. Fix #5527 in develop