Add dpkg lock handling to package installation