cd to dir if successful