fdf files in Python 3 need to be written to in binary mode

"wb" works for both versions. "w" will only work for Python 2.