Use propper dir and olddir variables when they should be used