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