Make file list processing a little more Python idiomatic.