emit files in SourceUnit relative to root dir, not pkg dir
handle created packages when there are also imported packages (e.g., an xtest pkg)