More robust lib searching.  Go through the parent directories until we find 'lib'.  Nowhere near perfect, but better than before.  Also use architecture checking.