Replace sys.exit by return in main

This allows to call the main function from the interpreter and make it
more flexible.

See http://wmanley.github.com/patch-tutorial/python-main-functions.html
Add python3 compatibility anf fix typos in README