*** M-x dirtrack arranges for better tracking of directory changes
in shell buffers.