Made the frameworks building more robust.

Now checks for incorrectly linked frameworks, and also checks for
/opt/name in homebrew.