fixes for if user does not specifies the optional 'directory' attribute in 'S3.config' object