Check the CredentialStore state before fetching creds again.
Minor Cleanups.
Added default argument to terminateSyncProcess
Fix backup name generation.
Check for emptiness before backuping the entire dir.
Handle rename fails for backup reasons correctly.
Add the --logdir commandline option

To log to a different file for every sync.

This also changed a QueuedConnection to AutoConnection, that way we
directly save the log from the main thread in the file without waiting
for the event loop (so if it crashes before, the log has been writen)
Really unload folders before reconfiguring.
Merge pull request #2 from owncloud/master

Merge with owncloud master