made pmi_cluster.py more robust to non-ascii, non-unicode input.  using bs4 to convert to unicode