DRY deploy tasks using a factory

Use a DeployFactory to define an interface and allow each deploy command
to "extend" it.
Fix broken build

The build task requires an outputPath option which is sneakily assigned
through the magic of availableOptions. (Took me quite some time to hunt
this one down).