TISTUD-6454 Titanium Studio creates recursive folder on startup

The prompt message might be misleading us in parsing the npm config prefix. The workaround/solution would be to pass in the prompt message and expect the same message when we try to parse the npm config prefix value.

This might help us to accurately get the prefix value instead of ending up with the unknown prompts.
Refactored the SudoManager classes with UI and core plugins and added test cases.