/images directory creation logic
Fix directory creation bug