Cleans up script file.