Sync method bugs fixed

New functions:
- upload local dirs to server
Bug fixes:
- compares now the last file write times
- sets the last file write time properly
- ability to upload files
Optimization:
- reduced amount of transactions needed to sync bilaterally
- more functions adapted to xml format handling
- obsolete code removed