Fixed building deb packages

The main change is disabling quilt but there are also changes to some scripts.
Also includes ruthless rearrangements that might break something on other platforms. Feel free to cherry-pick needed changes only.