Fix doctests in sagenb directory

I have been able to fix the doctests in sagenb/notebook directory. There are more failures on doctesting the root directory and I don't understand why. The following need to be fixed. Full logs are [present here](https://gist.github.com/ppurka/f8a0e3cb80ff89d90c00#file-doctests2-log).

```
sage -t --long util/apply-hg.py  # IOError in doctesting framework
sage -t --long util/fetch_deps.py  # IOError in doctesting framework
sage -t --long util/quota.py  # CalledProcessError in doctesting framework
sage -t --long sagenb/testing/grinder/simpleeval_multi.py  # ImportError in doctesting framework
sage -t --long sagenb/testing/grinder/simpleeval_factor.py  # ImportError in doctesting framework
sage -t --long sagenb/testing/grinder/sstest.py  # ImportError in doctesting framework
sage -t --long sagenb/testing/grinder/simpleeval.py  # ImportError in doctesting framework
sage -t --long sagenb/testing/grinder/logineval.py  # ImportError in doctesting framework
sage -t --long sagenb/testing/grinder/simpleopen.py  # ImportError in doctesting framework
sage -t --long sagenb/testing/grinder/pub.py  # ImportError in doctesting framework
sage -t --long sagenb/misc/comments2rst.py  # 4 doctests failed
sage -t --long flask_version/base.py  # ImportError in doctesting framework
sage -t --long flask_version/admin.py  # ImportError in doctesting framework
sage -t --long flask_version/worksheet_listing.py  # ImportError in doctesting framework
sage -t --long flask_version/worksheet.py  # ImportError in doctesting framework
sage -t --long flask_version/authentication.py  # ImportError in doctesting framework
sage -t --long flask_version/doc.py  # ImportError in doctesting framework
sage -t --long flask_version/settings.py  # ImportError in doctesting framework
```