This is the last movie filmed at Pirate's World, which closed in 1975.
Tom Sawyer and Huck Finn make "cameos" because Barry Mahon tried to make a Tom Sawyer movie, but gave up after one day of filming. The footage was likely included to help pad the film because Mahon's earlier Thumbelina (1970) (or Jack and the Beanstalk (1970), in some prints) was used.