Fixed install script and added gzip support for attachments