Add unlock to SyncTestCase.check_folder and pep8 cleaning