Normalize function used to get derivative filename

Hi,

A little patch to normalize the function used to get derivative filename.

The exiting method used to determine the extension is a confusion between the different types of dots, that can be either a normal character in the name of the file, or the separator between the name and the extension of the file.

As there is a php function to determine the extension, pathinfo(), it's better to use it, as in the patch, because it's more standard.

The patch can be done against application/models/File.php, line 266. Replace:
public function getDerivativeFilename()
{
    $filename = basename($this->filename);
    $parts = explode('.', $filename);
    // One or more . in the filename, pop the last section to be replaced.
    if (count($parts) > 1) {
        $ext = array_pop($parts);
    }
    array_push($parts, self::DERIVATIVE_EXT);
     return join('.', $parts);
}
By:
public function getDerivativeFilename()
{
    $base = pathinfo($this->filename, PATHINFO_EXTENSION) ? substr($this->filename, 0, strrpos($this->filename, '.')) : $this->filename;
    return $base . '.' . self::DERIVATIVE_EXT;
}

Sincerely,

Daniel Berthereau
Infodoc & Knowledge management