memoize cwd; installation subdirs should be first paths to be searched