Fix the "main executable" in the file map. Libraries end up pushed before it is.
Swap rpath contexts when opening a dynamic library with darwin_dlopen.
Use the name we already have instead of trying to find it by address when registering a new framework.
Stop one level up from Contents if we find it. Some bundles have other extensions (like .plugin)