Changing code to generate QRCode on the fly

This fixes 2 issues:

module loading on *nix systems was not working due to case of the file
generating the QR code on the fly rather than through temporary file creation (the QR code was not coming up sometimes for me - probably due due to a race condition)
Please add a call to htmlencode to every variable you use