Use the first directory we find instead of "rt-*" so extension tarballs work

There should be only one directory for well-behaved tarballs.

Additionally, die if we can't find a directory to chdir into when
unpacking instead of falling back silently to the current directory.
Merge branch '4.0/docs-from-extension-tarballs' into 4.0-trunk