Rbarlow fix cli publish

This pull request fixes the CLI for publishing and syncing, and contains fixes that are needed for the export distributor as well.