Change CWD automatically by patterns when you change the current buffer.