Fixed file mode/flags registers that I thought we fixed a long time ago