Create dirs on POST and PUT