GMail exports the entire account to a single mbox file. This script splits it into multiple mbox files according to the labels.