PHP Image upload, watermark, shrink, crop with optimal security