Fixing dialog api parameter parsing

Ran into a bug where 'args' is not defined for showSaveDialog & showMessage.