Update modularity2_directed.r