rename.pm: add a rename action

First cut, more testing needed.