fix not download files from Dropbox and add a simple lock

1. fix download problem
2. add a simple lock

When every time sync_download automatically, it will check lock, if there is a lock, then skip this time. if any event like upload a big file, it will set a lock. so will not run sync_download this time and cover local file. this may cause a event cycle.