Refactored s3 plugin structure.

This made the s3 plugin follow the design structure for a
CLI plugin. Some features in CLI were changed to enhance
plugins such as changes made in ``BasicCommand`` class.