scripts: fix host-credential generation

The system-test includes a script for generating a host
credential.  It currently contains BASH-isms and Debian-isms,
which this patch fixes.

Target: master
Request: 2.8
Request: 2.7
Patch: http://rb.dcache.org/r/6908/
Acked-by: Gerd Behrmann
Merge pull request #495 from paulmillar/fix/2.8/hostcredential

scripts: fix host-credential generation