histograms now save to the root file.

also the directory function works.