Implemented File.dup.
Merge pull request #226 from MagLev/matthias/IO_dup-1.9

Implemented File.dup.