[Fix #588] Set default-directory before switching a project

Add back `default-directory` which was removed in previous patch.