Better Python file handling.