I disagree. Apparently, you have had one set of bad experiences with an Agency. I have had a rather good experience.
At an Agency, I am usually brought in for green field projects that larger companies don't feel their team either has the time of expertise for. This is awesome.
Also, at an Agency, I get paid for every hour I work. This is not usually the case in Product Development, where salaries are more common. The caveat, would be if you have equity. Equity can beat being paid for every hour you work, but obviously this is not always the case.
Freelancing also means you usually get paid for every hour you work. However, you also have to spend mad time marketing and looking for clients, as well as managing taxes, heath care and other housekeeping items. I dislike this, and would rather have someone else do it for me.