I don't think this change is correct.  The list of folders is permitted to have an empty entry.  For example, if you have 3 media files:

alpha.jpg
foo/beta.jpg
foo/gamma.jpg

Then the list of folders will be array('', 'foo').  Selecting the first entry will give alpha.jpg and selecting the second will give beta.jpg and gamma.jpg