Add some code to process the PWD and CWD command