lib-credential.sh: use the $( ... ) construct for command substitution