Converted to use Getopt::Long

Converted command line options to use Getopt::Long.

Added support for more attachment types.

Converted script to OO approach, removing many globals.
Updated README.TXT

Changed some variable names.