Checkout: handle file modes properly. Global file mode override now works properly with the file mode stored in the tree node.