fixes for if user does not specifies the optional 'directory' attribute ...

...in 'S3.config' object

if user does not specify the optional 'directory' attibute, in final name of uploaded file-name, gets undefined in it. due to directory attribute being 'undefined'  
`
 http://s3.amazonaws.com/<bucket-name>/**undefined**69f049b8-ea15-46fd-ad9a-3b715f59606d.png
`