fix bug introduced when making edit.py handle multiple files