Bail if there are no records. Fix filename sanitization.
Bail if there are no records. Fix filename sanitization.

dsully/circulardb,dsully/circulardb,dsully/circulardb,dsully/circulardb,dsully/circulardb,dsully/circulardb