merged in the debian patches and removed trailing whitespace

most of the debian patches are just cosmetic (space/comments) so
easier to just merge upstream
undid path changes, left in whitespace fixes and /dev/null redirection
version detection fix