Added option to append actionButton to custom elt

Optional parameter to createActionButton specifies an element of the
document to append it to. Needed for porting manual tests so that we can
group test buttons logically on the page with headings etc. Defaults to buttons div as
before.