Added isset() and empty() validation to two vars

Adding debugging code to the top of the server code:

   error_reporting(E_ALL);
   ini_set('display_errors', TRUE);

Brought out warnings that variables that were not being set before use.  Caused the upload to fail because unexpected error descriptions were being dumped into the response. Used isset / empty logic to check those variables before use.
Merge pull request #26 from uberdanzik/master

Added isset() and empty() validation to two vars