Create dirs if needed.