New version of gen_rst.py supporting python3.
Merge branch 'dev' of https://github.com/pgmpy/pgmpy into dev