Fix tests for IPython.lib
Fixes for notebook session manager