Generate extension directory structure properly