Fix for bug#2638 - fast and slow upload: images and thumbs files do not have extension Changes to fix several PHP notices