Added code to auto-create images dir