Specify unicode type properly in rmagic

2to3 wasn't converting this instance of `unicode`, so it failed under Python 3.

I'll soon be making a similar change on a larger scale as we abandon 2to3.