Refactored CUploadedFile getExtensionName

Fixes issue #3035