A Malian court has ruled against Canadian mining company Barrick Gold in a dispute over its gold project in Mali.