Clean up file modes and names