Minor Q2 cleanup

Move patching to prepare(), quote strings with variables, fix mirror
URLs, and add .gitignore to ignore source files