You got a couple of options. If you're using 1.4.7 then the cheapest is to collect your quarrys output into a chest, attach a filter/transposer (depending on how fast your quarry is running) with a timer, and run a length of pneumatic tube from it. Then, craft a few barrels and a couple of chests. Put the barrels close to the filter/transposer and pre-determine what they'll store by priming the barrels with common blocks like cobblestone, dirt, marble and gravel. Depending on the size of your quarry, you could conceivably be dredging up a quarter of a million blocks before you hit bedrock, so you're gonna need a few barrels (or to empty them frequently) to hold all the "byproducts".
Put the chests at the end of the tube, and the quarry will pump all the crap into the barrels according to what you designated them to hold, and all of the good stuff will land in the chests.
Option 2, assuming you're on the Ultimate pack is generally the same, but with the barrels replaced by Deep Storage Units, which hold much more than a barrel and retain their inventory when broken. Considerably more expensive than barrels, but well worth looking into.
Option 3 is AE, and you can get around using massive storage drives by using barrels/deep storage units connected to your AE system via a Storage Bus set to a specific item. The AE system will then use the barrel/DSU as an extension of its own storage system without using up any drive space at all. It's a far cheaper method of mass-storage within an AE system than having to create 64k drives.
Option 4 is more complex; you can pipe the output into an ender chest/tesseract and process rather than store it. For this, you'd need to have a complete ore refinery set up.