Fix possible NPE when deleting a repository and cleaning-up branch-based tickets
Ensure repositories folder is created before executing a write test
Fix incorrect REWIND labeling  in reflog on all ticket pushes