IDL compiler: fix --write-file-only-if-changed in Python

Python idl_compiler.py --write-file-only-if-changed was broken,
due to mixing up "lines of file" (list of strings) vs. "contents of file"
(one long string), hence always caused recompile.
Fixed.

BUG=239771
TBR=haraken
NOTRY=true

Review URL: https://codereview.chromium.org/180993002

git-svn-id: svn://svn.chromium.org/blink/trunk@167852 bbb929c8-8fbe-4397-9dbb-9b2b20218538