Support filenames in map_samples

I think this does what we want