Fix cargo doc with custom build commands

There's no "doc-all" profile, so it needs to be canonicalized when finding the
name of the profile to pass to a build command.