updated spacebrew.py

replaced json.read with json.dumps and json.write with json.loads