Made -d outdir switch for publish command.