Minor changes in runserver.py
- Better error handling
- Fixed bad parameters in flask.jsonify