don't include packages with empty names
acquire the apt lock before modifying it's files!
Merge pull request #1 from carrott/master

take the apt lock!