memoize cwd; installation subdirs should be first paths to be searched
Merge pull request #5 from dginev/pathname-enhancements

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