adds automatic working directory change