Fix minimze bug in main function emacs-launcher

There was a small bug in the emacs-launcher function that minimized the
frame before a command waiting for input was done.