Improved method for finding install directory.