Bugfix if root has only outgoing edges

Hi,
This should fix the mst if the input graph has only outgoing edges.
for example
g={1: {2: 1, 3: 15}, 2: {3: 2}, 3: {}}
mst(1,g) should return {1: {2: 1}, 2: {3: 2}} not None

Thanks for the algorithm.