Currently (0.9.8.3), cmd_sync_remote2local() does not close the files it opens. As a result, large syncs from S3 to a local client can run into ulimit problems. You can confirm this issue by running a sync from an S3 bucket to your client and examining the output of 'lsof' to watch the number of open files associated with the process.
The attached patch closes the file after processing is complete. I've validated that the number of open files no longer increases during the course of a remote sync.