build_db.py: Improve properties parsing