Feature/error handling

This PR:
1) Fixes the error whereby a blank card was being created even when the upload was successful
2) Limits the supported image types to ['rgb', 'gif', 'png', 'bmp', 'gif', 'jpeg'] for now, mainly because PIL module treats PostScript files as image files!