Update mastered.php

Added a check for the new 'format' field when uploading and displaying cards.