Various cleanups

This pull request contains various whitespace cleanups and adds some generated files to .gitignore. Also two small changes to the built scripts that came up when looking at creating Debian packages. See the individual commits for details.