Fix bash error on cd: add space before ] in test expression