Subdir templates

Hi,

I made some tweaks to allow for subdirectories to be defined by using ${YEAR}, ${MONTH}, ${DAY}, and ${HOUR} which allows for simple partitioning with HDFS and whatnot.  It is much more flexible than the "store_tree" change that was created a while ago (and then looks like it was removed).

If you'd like me to make some changes just let me know.

Thanks,
Mike