made cd work, and fixed a bug with the scanner
pwd should use canonical path