IO.sysopen should raise an error when opening a directory with write/app end mode

Tested on versions 1.8.7, 1.9.3 and 2.0.