Refactor rsync

Update rsync to working code
Add methods to use web sockets to communicate with client to perform a sync
Why would `raw` not be set here?  Also, why are you mixing regular arrays and binary data (i.e., `raw = []` vs. `raw = data`)?