Add unit tests for privacy badger

this pull request adds several unit tests for files in lib and also src/utils.