changes in gallery json generations (changed paths); added functionality for galleriesList json; changed upload dir