Converted the rename script to be used with python3.