Replaced Python's tempfile class with calibre's
Replaced PIL functions with calibre's (cover needs to be cropped at this point)
Implemented calibre.utils.magick.Image for cropping and saving the cover.