Add a couple of utility functions for use in config scripts.
Merge https://github.com/kientzle/crochet-freebsd