fixes and unit test setup for caldav-managed-attachments plugin