[python] Prepend line to beginning of a file