[SCM-709] REGRESSION: git status doesn't work if repository root is not the working directory
Escape spaces in paths
remove unused imports and variable