tool_build/interface/command_compile: prevent newline at end.
tool_build/interface/package_compiler: split write funcs & markers.¹

1: We rarely need to write the properties, and it is helpful for
package building to have this distinction. Also simplifies callees
to have a general write() function that only executes if the marks
are set.