Fix file modes

@georgebarnick You can merge this, I just want to run it by you.