Thanks @lxp.
I've uploaded a fixed version of the script which should now work correctly in the rename dialog.