* simplify code * correctly handle crate roots and mod.rs files (nested inline modules are still mishandled) * make sure that new text contains a trailing newline