Use -p with mkdir.