Improved asyncore exception handling, arg parsing

Fixed exception handling on connection errors: close_all is a method on asyncore not asyncore.dispatcher.

Migrated to argparse as optparse is deprecated now.

Please review and pull.