Fix rename script to work with the new specification