Implementation of the rename action.