Serializes the contents of the script db to JSON.

def _save_db():
    """Serializes the contents of the script db to JSON."""
    from pyci.utility import json_serial
    import json
    vms("Serializing DB to JSON in {}".format(datapath))
    with open(datapath, 'w') as f:
        json.dump(db, f, default=json_serial)