builder: Handle trailing \ appropriately.

@tiborvass @LK4D4