#172: command/build: fix reference errors; finish dist dir