Set working dir correctly & escape spaces in directory name