allow a --root or -r option to be passed to specify the root directory