Write to an indexed sequence of files using the standard Python file API