Added support for the close value to the openModal() function as well. The value used for the closeThisDialog(value) call is used as the reject reason of the promised returned by openModal().
Merge pull request #2 from robbaman/closedialog-value

Added support for the close value to the openModal() function as well.