ci: Fix ci_verify_cmake.sh; improve ci.lib.sh

Fix ci_verify_cmake.sh: sync up CI_BUILD_TO_INSTALL_RELDIR with
CI_INSTALL_DIR. (Oopsie!)

Replace slashes, backslashes and dots with underlines in system
names and machine hardware names. These names are now included in
the output directory naming scheme.
diff --git a/ci/ci_verify_cmake.sh b/ci/ci_verify_cmake.sh
index 5b9242c..5d53c46 100755
--- a/ci/ci_verify_cmake.sh
+++ b/ci/ci_verify_cmake.sh
@@ -23,7 +23,7 @@
 # We use them for the benefit of native Windows tools that might be
 # otherwise confused by the path encoding used by Bash-on-Windows.
 CI_BUILD_TO_SRC_RELDIR="../.."
-CI_BUILD_TO_INSTALL_RELDIR="../ci_verify_cmake.install"
+CI_BUILD_TO_INSTALL_RELDIR="../ci_verify_cmake.$CI_TARGET_SYSTEM.$CI_TARGET_MACHINE.install"
 
 function ci_init_build {
     CI_CMAKE="${CI_CMAKE:-cmake}"
diff --git a/ci/lib/ci.lib.sh b/ci/lib/ci.lib.sh
index 4b63494..7569a46 100644
--- a/ci/lib/ci.lib.sh
+++ b/ci/lib/ci.lib.sh
@@ -26,8 +26,8 @@
 CI_TOPLEVEL_DIR="$(cd "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)"
 
 # Initialize the global constants CI_{HOST,TARGET}_{SYSTEM,MACHINE}.
-CI_HOST_SYSTEM="${CI_HOST_SYSTEM:-"$(uname -s | tr 'A-Z-' 'a-z_')"}"
-CI_HOST_MACHINE="${CI_HOST_MACHINE:-"$(uname -m | tr 'A-Z-' 'a-z_')"}"
+CI_HOST_SYSTEM="${CI_HOST_SYSTEM:-"$(uname -s | tr 'A-Z/\.-' 'a-z____')"}"
+CI_HOST_MACHINE="${CI_HOST_MACHINE:-"$(uname -m | tr 'A-Z/\.-' 'a-z____')"}"
 CI_TARGET_SYSTEM="${CI_TARGET_SYSTEM:-"$CI_HOST_SYSTEM"}"
 CI_TARGET_MACHINE="${CI_TARGET_MACHINE:-"$CI_HOST_MACHINE"}"