More robust lib searching.  Go through the parent directories until we f...

...ind 'lib'.  Nowhere near perfect, but better than before.  Also use architecture checking.