support for generating dependent files on save

will save any documents referenced by include documents
fix imports

Import parsing was broken when NewLine was introduced