CPython compatibility: raise an error for operations on a closed file descriptor

In CPython any operations on a file that has been closed already reaises
a ValueError with message "I/O operation on closed file"
Merge pull request #551 from stinos/closed-fd-err

CPython compatibility: raise an error for operations on a closed file de...