missing directory. Contributed by Craig Welch. (cherry picked from commit 5e67c4d384193b38a85655c8f93193596821faa5)