Fix multiple bugs in the artifact upload path.