sort files if they aren't sorted already, credits: photo360
see: http://www.magiclantern.fm/forum/index.php?topic=7682.msg108935#msg108935