CD Parameter handling altered

Changed the parameters of cd() so that it takes the whole array
correctly. It now only accepts 1 parameter as per the requirements.