Fix script file reading. Writing and reading script files now works!