Fix the build.

After an upstream fix in docopt, cargo now builds on rust HEAD. Also,
move to the semver crate rather than the deprecated built-in one.