Adds a check to create the directory in the sub_dir setting if it doesn't exist