Running caTools when an explicit CA_BASE_DIR path is not set in setup.php results in a mess of errors as the script cannot determine the installation's root directory. caUtils can do this, so we need to move that code over to caTools.