Fix the "rebuild" command so that it works in an open check-out without
having to specify the repository and so that it accepts the -R option.