A stranded dog was helped to safety in Peru, where floods have left scores of people dead.