specify encoding in io.open call
Merge pull request #3879 from minrk/pr/3870

specify encoding in nbconvert io.open call (finishes #3870).