fix CWD interpretation for shell adaptors

I am sure you will appreciate the diff :-)