fix file mode, mode "x" is undocumented for py 2.x, but exists since 3.3

it did not seem to cause issues on 2.6 and 2.7, so python seems to ignore "x"?
a bit strange is that we had this "x" mode in our 2.x codebase before we introduced python 3.x compatibility.