Switched to argparse and added gzip capabilities

Now using argparse because it's better, and because optparse is deprecated.
Can now use gzip for compressing data before encrypting it into the images.

Also generally cleaned up code and made it more readable.
Also minor comment changes.