avoid getwcd() error by switching to a new directory before apt-get call