strip empty lines and comments before adding to .git/info/sparse-checkout-new
allow comments after otherwise valid lines, not only at the beginnig of a new line