Added the ability to pass nb in as a buffer

I have a use case where I need to pass in a buffer object instead of a string that opens a file (so I can read a notebook from a Django file object). I made a simple backwards compatible change to the constructor that allows for passing a nb buffer directly instead of a file path.