Update upload.php

Changed opening mode, could be dealing with binary.