Accept multiple files at once. Closes #2253

This fixes the issue when the files were not accepted until the main window will shown.