Add unit test for invalid arguments re #6983

Signed-off-by: Karl Palmen <karl.palmen@stfc.ac.uk>
Add guts of RenameWorkspaces and extend unit test re #6983

Signed-off-by: Karl Palmen <karl.palmen@stfc.ac.uk>