Fixed recursion. Git not needed for it to work.

Avoid infinite `cd` loops under certain conditions. Try getting `.venv` from the current directory (not necessarily always using git)
Merge pull request #1839 from Kronuz/patch-1

Fixed recursion. Git not needed for it to work.