fix: ensure ipython engine is not left in an undefined directory - close...

...s #983