I can't tell you how long I've wanted this feature. I've been using this patch for a couple of months now and it works great. Thanks.
Now, if you could make this work without having to open the playlist it'd be perfect.
One small bug: src/playlist.cpp calls unlink() so you'll need to #include <unistd.h>. Otherwise it'll fail to build on >= GCC 4.7.