Update thumb.lib.php

- Added support for saving different image types.
- Changed '.thumb' to '-thumb' since it looks better with fewer periods in the filename.