Generalized sofroniewLoader so it takes a folder as an argument and loads all .tif images in that folder.