Fix recursion issue if script is called multiple times.

Is useful to call it twice if you want to recover terminal launcher and roscore window.
In this case, the $HOME variable was overwrite again, creating a deeper workspace.
Cheking it by looking for the 'ros ditro sandwich' pattern.