I'm not able to get this to work for my keys. All my keys are associated with an account, and it seems that keys associated with accounts can only be accessed when logged into that account.
i was in the middle of a rewrite of this script to support the new accounts that HiB started using, but never got it into a repo before that laptop crumbled. maybe i can work something out for that in the near future, but i'll have to start over again.
Aww, I've been there before. In the mean-time, I wrote my own (considerably less feature-rich) script and posted it at http://git.ersoft.org/git/hib-dlagent.git/tree/hib-dlagent .