[fix] undefined index extension warning on php logs

This solves an issue that happens when clicking on purge on languages manager. Apparently the issue also happens elsewhere. The problem is that pathinfo does not set the `extension` index if the file does not have an extension as stated in the example #2 at [php.net](http://php.net/manual/en/function.pathinfo.php)