Create Image Dir if not present

Instead of throwing an error, create the image directory,
if not present.
The inotify code should create the image directory if not present,
not the upload or TFTP code. Removed creating the image directory from
the TFTP here and removed from the upload in another commit.

Change-Id: I8c142283cfd5a3c87bdf2291d2e79729ec9ac319
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/download_manager.cpp b/download_manager.cpp
index 35c8109..b89ac22 100644
--- a/download_manager.cpp
+++ b/download_manager.cpp
@@ -55,11 +55,13 @@
                      entry("FILENAME=%s", fileName),
                      entry("SERVERADDRESS=%s", serverAddress));
 
-    // Check if IMAGE DIR exists and create if necessary.
+    // Check if IMAGE DIR exists
     fs::path imgDirPath(IMG_UPLOAD_DIR);
     if (!fs::is_directory(imgDirPath))
     {
-        fs::create_directory(imgDirPath);
+        log<level::ERR>("Error Image Dir does not exist");
+        elog<InternalFailure>();
+        return;
     }
 
     pid_t pid = fork();