Make the server more defensive on getting msgs from the worker.

Change-Id: Ibb2e06951c9d2af256b770f3e8ce14bb0cc92c1b
Merge pull request #57 from robertmaynard/more_worker_msg_checks

Make the server more defensive on getting msgs from the worker.