Support for separate output_dir.
Clean up tmpdirs used for new torrent files.
Clean up tmpdirs upon exception, too.
Don't clobber an existing transcode directory.
transcode.main now calls transcode_release.

Makes it possible to test transcode_release from the command line; and
produces the same transcode output as whatbetter, in case you prefer
to upload manually.
Use Pool.map_async and get() result, rather than Pool.apply_async.

This will check for exceptions during the transcoding process, rather
than silently ignoring them. It also allows the user to interrupt the
current transcode with Ctrl-C.

Note: the use of Pool.map_async followed by get() with a large
timeout, rather than just Pool.map, is a workaround for a bug in
Python's implementation of Pool.join(). See the comments in the code
for details.
transcodes now fail if any process in pipeline fails.

Fixes the problem where a process in the transcode pipeline fails but,
because it's not the last process in the shell pipeline, it isn't
detected. This change should prevent bad/failed transcodes from being
uploaded.
Clean up after failed transcodes.
Remove support for Ogg and AAC (no longer accepted).

Note that these formats are stil supported by mediafile.py, just not
by whatbetter, the API, or the transcoder.

Remove ALAC from transcode.py, as well.
Replace mediafile.py tagging with native mutagen solution.

The version of mediafile.py included from the beets project has some
problems, including, but not limited to, the following:

  * It always writes a broken USLT tag in MP3 files.
  * It writes TBPM=0 in MP3 files if the FLAC bpm tag isn't present.
  * It writes albumartist in the ID3 TXXX:Album Artist tag (a
    deprecated foobar2000 behavior).
  * It supports some other unusual/deprecated tags.

mutagen's EasyID3 implementation fixes all these issues, supports a
bunch of "standard" tags not supported by mediafile (conductor, asin,
additional MusicBrainz tags, etc.), and the code needed to implement
it is a lot smaller than mediafile.py.

It's also easily extensible, and this change takes advantage of that
to add support for some common tags that EasyID3 doesn't support out
of the box, most importantly albumartist (TPE2).
Stub out unused 'key' parameter.
Support for TRCK and TPOS x/y-style tags.
Strip the FLAC tags when copying them, just to be safe.
Ensure successful transcodes have required What.CD tags.

Just a simple sanity check to avoid bad uploads.
Check tags on source files before proceeding with transcoding.
Add a --no-upload flag.

Useful for testing, or for reviewing transcodes before uploading them.
terminate() and join() the pool even when an exception occurs.

This fix seems to clean up a few corner cases where leftover processes
were lingering after an exception occured during the transcode.
Clean up children of pool processes on SIGTERM.

To ensure that a terminated pool subprocess terminates its children,
make each pool subprocess a process group leader, and install a
SIGTERM handler in the pool subprocess that kills the process group.

Prior to this change, child processes of pool processes would continue
until finished, if the pool process was terminated.
Strip '\x00' from tags.
Ignore pre-emphasized torrents (no lossy transcodes allowed).