Python Append Lines To File