The following patch to `package.el' makes it so that `package-install-from-buffer' (and `install-file') works on dired buffers. Before, they'd just work on .el and .tar files.

Since the necessary .tar file is just a tared directory, it seems natural to extend this functionality to untared directories. Package repositories should still distribute tar files, of course, but manual installation is now easier and can be done directly from a package's directory.

If we're ok with this feature and if nothing's missing (does this warrant an info update?), I'll merge it in.