Fix for temp file on windows
On windows the temp file cannot be opened a second time while it is still opened by python. Close the file in python before asking the compiler to read it. See https://docs.python.org/3.7/library/tempfile.html#tempfile.NamedTemporaryFile