Fix debian packaging

There were a lot of problems with the debian packaging. Very little was done to produce a working package prior to this.