Fixing test cases for ipython 2.x

Incorporating changes to REST api and nbformat that came with ipython
2.0.