fix bug in json encoding task output

Task now returns a repr of the tasks output. A response that fails to
encode properly will still respond with an invalid json message.

	modified:   base.py
	modified:   workqueue.py