Update upload.php

Added error checking for shell commands, kind of a hack though