added restart and empty cluster handling in kmeans.py

now takes the best of 50 tries

fixed a bug in util.py where match_beta is saving the beta matrices in
exponentiated form