Fixed memory overload of the session when importing via folder.
Added an option to define the extension when importing via folder.