Gallery: Create directory one by one and set proper modes.