Only append footer if buttons exist.

When creating dialogs without any buttons specified, the footer is still appended to the modal body. I am not sure whether or not you want to enforce buttons being present, or implement this another way, but this solved the problem in my cases.

Thanks