[python] Create a file if it doesn't exist