update exception syntax for Py3k
bugfix in returning a list in Py3k
Merge pull request #384 from nusolar/master

Fix exception syntax, fix subtle dict_keys-->list error [py3k]