ENHANCEMENT: Allow setting of canAttachExisting and canPreviewFolder

#62 squashed and rebased onto master.