Creating previewsdirectory in initialization life cycle.