fix path extensions in php52