Deb build fixes

Several fixes, so that deb builder framework works.