- expanded exit_on_escape callback to real function; added guard for when
  documentation is being built.