Generate correct directories