Fix monkey-patched os.open(): add dir_fd parameter

The os.open() function got a new option keyword-only dir_fd parameter in
Python 3.3:
https://docs.python.org/3/library/os.html#os.open

With this change, the open() now accepts the dir_fd parameter.

For example, the dir_fd parameter is used by shutil.rmtree() for safety:
https://docs.python.org/3/library/shutil.html#shutil.rmtree
"Changed in version 3.3: Added a symlink attack resistant version that is used automatically if platform supports fd-based functions."