Fix custom directory creation on ubuntu. Fix apt pgdg test.

Because it's not working with build-essentials 1.x