Update UploadBehavior.php

Added error suppression, and refactored deletion code to reflect Jose's recommendations.