Proper directory switching.