Fixed a bug when saving images.

Images were being saved, but they were missing a trailing directory delimitor. This was causing images to be stored one directory up with a slightly different extension.