change directory properly