some refactoring

* only one cherrypy.expose is enough
* pass a dict to the web-exposed method
* convert to json in the web-exposed method
* use exceptions
* remove unused paths
Merge pull request #1 from nilx/master

Thank for the correction, It works if I change the directory ;)