Fixed a couple small bugs in processupload.php