Some changes so that the folder works immediately on scinet
-Also added in JDs write_den flag to dist_init...