Augment kbeswick's version of the script; a bit more tolerant of relative paths and...