Fix case where command namespace contains Command

Fixes the case where a command has a namespace that contains the string `Command`. For example, if I have a command `Acme/Commanding/LaunchMissileCommand`, only the last instance of `Command` should be replaced with `CommandHandler` or `Validator`.