Kernel#open should correctly handle objects that responds to to_open