Fix build issues on Ubuntu 13.04

 * Add missing <unistd.h> include
 * Check for presence of bzip2 library

MD-19678 #time 10m
Replace use of deprecated pkgconfig() macro with find_package()

MD-19678 #time 15m
Fix updater test on Ubuntu 13.04

Set file permissions to match those specified in
the updater script or in the case of new-dir/new-dir2
the mode hard-coded into FileUtils::mkdir()