Update class_lib.php

Created the 'Upload' object to consolidate code used to upload card images throughout the script.