Cutting down trees in rainforests facilitates the spread of invasive black rats, a study suggests.