fix bug in modularity_louvain_dir, all but one modularity test (modularity_finetune_dir) now pass