Fix --version outside of a site (#974)

For review — by @ralsina, preferably.  Or maybe by @schettino72 because `--version` is probably implemented in doit.