makes sure that the parent dir is present