Improved RenameModulesScript.

It now properly handles test renames.