Add support for archiveArtifacts / allowEmpty

In adding this, also offers a closure form for specifying archiveArtifacts options.