error_exit "refusing to overwrite pre-existing file at $1"
         fi
     }
-    _PATH="$1"
-    _FILENAME=$(basename ${_PATH})
-    _TARGET_PATH_KEY="${PATH_BORG_CONF_KEYS}/${_FILENAME}"
-    if [ ! -f "${_PATH}" ]; then
-        error_exit "no file at ${_PATH}"
+    _PATH_SOURCE="$1"
+    _FILENAME=$(basename ${_PATH_SOURCE})
+    _PATH_TARGET_KEY="${PATH_BORG_CONF_KEYS}/${_FILENAME}"
+    if [ ! -f "${_PATH_SOURCE}" ]; then
+        error_exit "no file at ${_PATH_SOURCE}"
     fi
-    _ensure_no_overwrite_at "${_TARGET_PATH_KEY}"
-    _REPO_ID="$(head -1 ${_PATH} | cut -d' ' -f2)"
+    _ensure_no_overwrite_at "${_PATH_TARGET_KEY}"
+    _REPO_ID="$(head -1 ${_PATH_SOURCE} | cut -d' ' -f2)"
     if [ ! -z "$(echo ${_REPO_ID} | sed 's/[a-f0-9]//g')" ]; then
-        error_exit "inability to parse valid repo ID from alleged key file at ${_PATH}"
+        error_exit "inability to parse valid repo ID from alleged key file at ${_PATH_SOURCE}"
     fi
-    _TARGET_PATH_LOCATION="$(path_repo_location ${_REPO_ID})"
-    _ensure_no_overwrite_at "${_TARGET_PATH_LOCATION}"
-    mkdir -p "${PATH_BORG_CONF_KEYS}" "${PATH_BORG_CONF_SECURITY}"
-    echo "Copying ${_PATH} to ${_TARGET_PATH_KEY} …"
-    cp "${_PATH}" "${_TARGET_PATH_KEY}"
-    echo "Writing ${_TARGET_PATH_LOCATION} …"
-    echo "$(location_from_servername ${_FILENAME})" > "${_TARGET_PATH_LOCATION}"
-    chmod a-rwx "${_TARGET_PATH_KEY}" "${_TARGET_PATH_LOCATION}"
-    chmod u+rw "${_TARGET_PATH_KEY}" "${_TARGET_PATH_LOCATION}"
+    _PATH_TARGET_LOCATION="$(path_repo_location ${_REPO_ID})"
+    _ensure_no_overwrite_at "${_PATH_TARGET_LOCATION}"
+    mkdir -p "${PATH_BORG_CONF_KEYS}" "$(dirname ${_PATH_TARGET_LOCATION})"
+    echo "Copying ${_PATH_SOURCE} to ${_PATH_TARGET_KEY} …"
+    cp "${_PATH_SOURCE}" "${_PATH_TARGET_KEY}"
+    echo "Writing ${_PATH_TARGET_LOCATION} …"
+    echo "$(location_from_servername ${_FILENAME})" > "${_PATH_TARGET_LOCATION}"
+    chmod a-rwx "${_PATH_TARGET_KEY}" "${_PATH_TARGET_LOCATION}"
+    chmod u+rw "${_PATH_TARGET_KEY}" "${_PATH_TARGET_LOCATION}"
 }
 
 cmd_keys() {