If you're willing to spend a little money, you can do this a WHOLE LOT more simply and with more advanced features (such as scheduling) using Audio Hijack Pro ($32). Believe me, I think it's one of the best shareware investments I've ever made. There is also WireTap Pro, a bit more expensive but also excellent (more for "pros" though I think).