Initialise OPTIND in cd() function
Use single quotes for printf