Change using pathinfo function to the splfileinfo

Because there is problems with Russian(maybe not only with Russian) names in files, I've changed logic from using pathinfo funciont to splfileinfo object