Fix filemode updating in diff text