Added os.path.isdir(SECRET_DIR) to conditional in settings.common to add SECRET_FILE if missing.