Fix tree delete for read only files