changing to always create catalog backup file on export even if one already exists (not sure if this is necessarily the right thing to do, but at least it's what I seem to need most often)
Pulled out the call to get__path from the main query in 'folder-chunk' and added a separate query before that db_multirow - suggested by Dave and Don for scalability reasons.