Modified txt2metis to remove self loops from input graph