make sure missing parent directories are created.