Allow building onto an identical branch

This means stripping an error message from a command that otherwise
succeeded. Without this, a command line that includes spaces and a
newline is passed to shelljs, which then hangs.