Fix change directory

Was not using is_last_token() before so
was looking for extra carriage returns.