Fix broken repository and carddav import

Hey,

First of all thanks for your work!
There were a few issues I had to fix in order to get bbdb<->caldav sync to work. Here are my patch so you can include them into your repo

Oliv