Always close script linemap file after reading and always dispose of other streams in the script engine even if exceptions are thrown.
minor: improve logged error in XEngine.SetXmlState if there was a problem writing the linemap.

The previous error report of already exists is inaccurate since existing files do get overwritten.