Fix extension detection

And add test similar to Montage's ReelLoader