Fixed directory bug with Dialog.openFile() on Windows

I took the liberty of trying this out, and it fixes the bug on my end. This fixes it on the haxe level. If you wanted to fix it on the cpp level or try something else instead, feel free to just reject this pull request.