fixed bug when changing the pwd in the file system conflicting with
virtual directories