add flags to mkdir for creation-on-the-fly