made urllib import work with python3 and python2

nbtoc.py did not work with python 3.4 due to the urllib2 import. The modified version works for me with
python 2.7 and python3.4.