Added a check that if the gallery folder does not exist then it is
created.
Merge branch 'master' into demo