Initial cd support within shell; lots of minor fixes