Some refactoring in repocommit

Change-Id: I94ae136b43e7b2e61d47ddc9c1b15ec19a3f7095
Ensure /var/list exists

Change-Id: I9a4398bcd20eb1ff3ec8b7d6c230352471122ad6