create directory before changing to it