correcting IoMode check for SEEK_AND_WRITE
Merge pull request #296 from daniel-meister/2.7

correcting IoMode check for SEEK_AND_WRITE