Move change to $TARGET directory to client-related block. Add matching change directory to OLDPWD.
Do not return to OLDPWD after completing client installation (OLDPWD may not exist).
Start operation in home directory and always return to home directory after completing "outside" tasks.

Some scripts (notably Ubuntu's 'service' script) frown upon non-existing
cwd which we may run into after thekraken post-install cleanups.