records: fix for document default name generator

* Adds catching exceptions around `os.makedirs`.

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>