added bullet proof ephemeral directory creation