[cmd] Ensure there is a linebreak before gem lines inserted before installer

Fixes #2798