Image.pm, File.pm update

- Fixed detection of file extensions
- Fixed deleting images in Image.pm