Fix the way to retrieve file extension.

If the file name contains point before the extension, this way "list(, $extension) = explode('.', $file['uri']);" use first string after the point as extension. We should use the last point to determine the file extension.
Exemple : 
   file.one.pdf ==> is pdf
   file.pdf ==> is also pdf
Merge pull request #2 from abuhamza/master

Fix the way to retrieve file extension.