dest in s3 module does not work with ~username expansion for home directories

I wrapped dest definition in os.path.expanduser() which will return the expanded path in case of successful tilde expansion and otherwise the original value